//函数整体注解（只针对函数表达式）
type CalcType = (a: number, b: number) => number

const add: CalcType = (a, b) => {
  return a + b
}


const sub: CalcType = (a, b) => {
  return a - b
}

console.log(add(1, 2).toFixed(2));

console.log(sub(1, 2).toFixed(2));
